package com.maomao.maomaochong_i.personalPackage;

import android.content.Intent;
import android.os.Bundle;
import android.support.v7.app.AppCompatActivity;
import android.view.View;
import android.widget.Button;
import android.widget.EditText;
import android.widget.Toast;

import com.maomao.maomaochong_i.R;
import com.maomao.maomaochong_i.application.MyApplication;

/**
 * Created by maomao on 2017/5/17.
 */

public class Register extends AppCompatActivity implements View.OnClickListener{
    private EditText telephone, password;
    private Button getBut,setBut;

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.personal_register);
        MyApplication.getInstance().addActivity(this);
        bindView();
    }

    private void bindView(){
        telephone = (EditText) findViewById(R.id.editText1);
        password = (EditText) findViewById(R.id.editText2);
        getBut = (Button) findViewById(R.id.button1);
        setBut = (Button) findViewById(R.id.button2);

        getBut.setOnClickListener(this);
        setBut.setOnClickListener(this);
    }

    @Override
    public void onClick(View v) {
        Intent intent = null;
        switch(v.getId()) {
            // 获得验证码按钮
            case R.id.button1:
                Toast.makeText(this,"倒计时开始",Toast.LENGTH_SHORT).show();
                break;

            // 设置密码
            case R.id.button2:
                intent = new Intent(Register.this, RegisterAgain.class);
                startActivity(intent);
                break;
        }
    }
}

